chore: move rivetkit to task model#4680
chore: move rivetkit to task model#4680NathanFlurry wants to merge 1 commit into04-16-chore_rivetkit_to_rustfrom
Conversation
|
🚅 Deployed to the rivet-pr-4680 environment in rivet-frontend
|
|
Code Review: PR #4680 - chore: move rivetkit to task model Overview This is a substantial refactor (~33k lines changed across 218 files) that replaces the old implicit event-loop/lifecycle model in Positive Aspects
Issues Issue 1 - Convention Violation: pub actors: Arc<StdMutex<HashMap<String, HashMap<u32, SharedActorEntry>>>>,
pub live_tunnel_requests: Arc<StdMutex<HashMap<[u8; 8], String>>>,
pub pending_hibernation_restores: Arc<StdMutex<HashMap<String, Vec<HibernatingWebSocketMetadata>>>>,CLAUDE.md explicitly prohibits this: "Never use Issue 2 - Tracing Style Violations in Two tracing::warn!("{reason_label} shutdown timed out waiting for shutdown tasks");
tracing::warn!("{reason_label} shutdown timed out after disconnect callbacks");Should use structured fields: tracing::warn!(reason = reason_label, "shutdown timed out waiting for shutdown tasks");All other Issue 3 - Double
Issue 4 - Both the struct and its impl block carry Issue 5 - Unnecessary Re-acquire After Once Minor Observations
Summary The architectural direction is sound. The explicit task model with event-driven drains is a meaningful improvement over the previous polling-based lifecycle. Items to address before merge:
|
5ca4ef7 to
710f2df
Compare
710f2df to
5b8e173
Compare
28a55d1 to
f4ad70b
Compare
5b8e173 to
02b0b04
Compare
02b0b04 to
b2af041
Compare
b2af041 to
94992cd
Compare

Description
Please include a summary of the changes and the related issue. Please also include relevant motivation and context.
Type of change
How Has This Been Tested?
Please describe the tests that you ran to verify your changes.
Checklist: